using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Hitpoint : MonoBehaviour
{
    public int Maxdamage;
    public int Mindamage;
    
    private void OnTriggerEnter(Collider other)
    {

        if(other.CompareTag("Player"))
        {
            other.GetComponent<playercontroller>().playerHealth(Random.Range(Mindamage,Maxdamage));
        }
    }
}
